<template>
  <div class="iot-container">
    <div class="demo">
      <el-form :inline="true" :model="formInline" style="margin-bottom: -20px">
        <el-form-item :label="label"
        style="width:45% margin:0 15px">
          <el-select
            v-model="formInline.plantType"
            placeholder="请选择种类"
            clearable
          >
            <el-option
              v-for="item in Optionslist"
              :key="item.plantCode"
              :label="item.plantName"
              :value="item.plantCode"
            ></el-option>
          </el-select>
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>
<script>
export default {
  name: "formSelect",
  components: {},
  props: {
    Optionslist: {
      type: Array,
      // required: true,
      default: function() {
        return [];
      }
    },
    label: {
      type: String,
      default: ""
    }
  },
  data() {
    return {
      formInline: {
        plantname: "",
        plantType: "" //作物类型
      }
      // Optionslist: [] // 作物类型
    };
  },
  mounted() {
    // this.getPlantList();
    // this.getAllTypeList();
  },
  methods: {
    // handleClickDetail() {},
    // getAllTypeList() {
    //   this.Optionslist = []; // 作物类型
    // }
  }
};
</script>
<style scoped>
/* .iot-container{
  width: 100%;
  height: 100%;
} */
.demo {
  display: flex;
}
</style>
